#!/bin/bash

#password judgement
pwd_jud(){
	read -s -p "please input password:" u_pwd
	if [[ -z $u_pwd ]];then
		echo -e "\e[1;41m The password cannot be empty\e[0m"
	elif [[ $u_pwd == zimakaimen ]];then
		echo -e "\e[1;42m password is true \e[0m"
		exit
	fi
}
pwd_jud
if [[ $u_pwd != zimakaimen ]];then
	for i in {3..1}
	do
		echo -e "\e[34mpassword is erorr,you have\e[0m \e[31m $i \e[0m \e[34mchance,please again:\e[0m"
		pwd_jud
	done
fi
